import request from '@/utils/request'

// 查询项目人员列表
export function listUser(query) {
  return request({
    url: '/project/user/list',
    method: 'get',
    params: query
  })
}

// 查询项目人员详细
export function getUser(projectUserId) {
  return request({
    url: '/project/user/' + projectUserId,
    method: 'get'
  })
}

// 新增项目人员
export function addUser(data) {
  return request({
    url: '/project/user',
    method: 'post',
    data: data
  })
}

// 修改项目人员
export function updateUser(data) {
  return request({
    url: '/project/user',
    method: 'put',
    data: data
  })
}

// 删除项目人员
export function delUser(projectUserId) {
  return request({
    url: '/project/user/' + projectUserId,
    method: 'delete'
  })
}

// 导出项目人员
export function exportUser(query) {
  return request({
    url: '/project/user/export',
    method: 'get',
    params: query
  })
}

// 获取文件列表
export function selectFiles(projectUserId) {
  return request({
    url: '/project/user/files/' + projectUserId,
    method: 'post',
  })
}